<?php
$montant = $this->cart->total();
$livraison = $this->session->userdata('livraison');
$adr = $this->session->userdata('adr');
$promo= $this->session->userdata('promo');
if($promo!="")$pct=$this->home_m->get_pct_promotion($promo); else $pct=0;
$nom = "";
$prenom = "";
$email = "";
$tel = "";
$dat = "";
foreach ($client as $aRow):
    $nom = $aRow['nom'];
    $prenom = $aRow['prenom'];
    $email = $aRow['email'];
    $tel = $aRow['tel'];

    $dat = $aRow['dat'];
endforeach;
?>
<div id="wrapper-content" align="left">
    <div id="titre_list_produit"><?php echo $langue['etape2']; ?></div>
    <div id="etape2">
        <table id="profil_detail">
            <tr><td width="150px" ><?php echo $langue['nom']; ?></td><td><?php echo $nom; ?></td></tr>
            <tr><td><?php echo $langue['prenom']; ?></td><td><?php echo $prenom; ?></td></tr>
            <tr><td><?php echo $langue['email']; ?></td><td><?php echo $email; ?></td></tr>
            <tr><td><?php echo $langue['telephone']; ?></td><td><?php echo $tel; ?></td></tr>
        </table>
        <table id="profil_detail">
            <tr><td width="150px" ><?php echo $langue['montant']; ?></td><td><?php echo $montant; ?> &euro;</td></tr>
            <tr><td><?php echo $langue['frais_liv'] ?></td><td><?php echo $livraison; ?> &euro;</td></tr>
             <?php if($pct>0){?>
            <tr><td>Promotion</td><td>- <?php echo ($montant*$pct)/100; ?> &euro;</td></tr>
            <?php  }?>
            <tr><td>Total</td><td><?php echo $montant + $livraison -($montant*$pct)/100; ?> &euro;</td></tr>
            <tr><td><?php echo $langue['adr_liv'] ?></td><td><?php echo $adr; ?> </td></tr>
        </table>


        <table id="list_commande">
            <thead>
            <th align="left"></th>
            <th align="left"></th>
            <th align="left">Type</th>


            </thead>

            <?php
            $i = 1;
            foreach ($method as $aRow):
                if ($i == 1) {
            ?>
                    <tr>
                        <td><input type="radio" name="livraison"  value="<?php echo $aRow['id'] ?>"  CHECKED ></td>
                        <td width="100px">  <img width="50px" border="0" src="<?php echo base_url() . 'assets/images/' . $aRow['img']; ?>"/></td>
                        <td width="200px"><?php echo $aRow['nom'] ?> </td>

                    </tr>
            <?php } else {
 ?>
                    <tr>
                        <td><input type="radio" name="livraison"  value="<?php echo $aRow['id'] ?>"  ></td>
                        <td width="100px">  <img width="50px" border="0" src="<?php echo base_url() . 'assets/images/' . $aRow['img']; ?>"/> </td>
                        <td width="200px"><?php echo $aRow['nom'] ?> </td>
                    </tr>
            <?php
                }
                $i++;
            endforeach;
            ?>
        </table>


    </div>
    <!--end etape1-->
</div>

<!--end wrapper-content-->